﻿using AutoMapper;
using Provenance.Domain.Breed;
using Provenance.Domain.DeepProcess;
using Provenance.Domain.Product;
using Provenance.Domain.Slaughter;
using Provenance.Domain.User;
using Provenance.Write.Api.Application.Command.Breed;
using Provenance.Write.Api.Application.Command.DeepProcess;
using Provenance.Write.Api.Application.Command.Product;
using Provenance.Write.Api.Application.Command.Slaughter;
using Provenance.Write.Api.Application.Command.User;

namespace Provenance.Write.Api
{
    public class MappingFiles:Profile
    {
        public MappingFiles()
        {
            CreateMap<InsertPermissionCommand,Permission>().ReverseMap();
            CreateMap<UpdatePermissionCommand,Permission>().ReverseMap();

            CreateMap<InsertRoleCommand,Role>().ReverseMap();
            CreateMap<UpdateRoleCommand,Role>().ReverseMap();

            CreateMap<InsertUserCommand,UserInfo>().ReverseMap();
            CreateMap<UpdateUserCommand,UserInfo>().ReverseMap();

            CreateMap<InsertProductInfoCommand,ProductInfo>().ReverseMap();
            CreateMap<UpdateProductInfoCommand,ProductInfo>().ReverseMap();

            CreateMap<UpBreedingInfoCommand, BreedingInfo>().ReverseMap();
            CreateMap<InsertBreedHealthCommand,BreedHealth>().ReverseMap();
            CreateMap<UpBreedHealthCommand,BreedHealth>().ReverseMap();
            CreateMap<UpBreedEnterpriseCommand,BreedEnterprise>().ReverseMap();

            CreateMap<UpSlaughterInfoCommand, SlaughterInfo>().ReverseMap();
            CreateMap<UpSlaughterEnterpriseCommand,SlaughterInfo>().ReverseMap();

            CreateMap<UpDeepProcessInfoCommand, DeepProcessInfo>().ReverseMap();
            CreateMap<UpRowMaterialCommand,RowMaterial>().ReverseMap();
            CreateMap<UpAuxiliaryMaterialCommand,AuxiliaryMaterial>().ReverseMap();
            CreateMap<UpAdditiveCommand,Additive>().ReverseMap();
            CreateMap<UpPackagingMaterialCommand,PackagingMaterial>().ReverseMap();
            CreateMap<UpDeepProcessEnterpriseCommand,DeepProcessEnterprise>().ReverseMap();

            CreateMap<InsertPictureInfoCommand,PictureInfo>().ReverseMap();
        }
    }
}

